<template>
    <div class="container">
        <div class="header">
            <div class="bar">
                <h1></h1>
                <div class="back" @click="back">
                    <i class="iconfont icon-left"></i>
                </div>
            </div>
            <div class="title">餐品制作中</div>
            <div class="info">
                <div class="top">
                    <div class="pic">
                        <img src="@/assets/img/order_foodnum.png" alt="">
                    </div>
                    <div>
                        <h1>取餐码: 0098</h1>
                        <p><span>在店里吃</span>您目前排在第N位</p>
                    </div>
                </div>
            </div>
        </div>
        <div class="content">
            <div class="head">
                <div class="pic">
                    <img src="@/assets/img/order_avatar.png" alt="">
                </div>
                <h1>包裹王同德店-商超</h1>
            </div>
            <div class="total">
                共N件商品
            </div>
            <div class="list">
                <orderItem v-for="item in 3"></orderItem>
            </div>
            <div class="fee">
                <div class="item">
                    <span class="sum">合计金额</span>
                    <span class="jine">¥82</span>
                </div>
            </div>
        </div>

        <div class="order-info">
            <div class="top">
                <div class="left">订单备注：</div>
                <div class="right">
                    备注内容备注内容备注内容备注内容备注内容备注内容备注内容
                </div>
            </div>
            <div class="content">
                <div class="item">
                    <div class="left">订单编号：</div>
                    <div class="right">
                        <span class="text">23174910923790870</span>
                        <span class="copy">复制</span>
                    </div>
                </div>
                <div class="item">
                    <div class="left">下单时间：</div>
                    <div class="right">2019-04-03 15:32:03</div>
                </div>
                <div class="item">
                    <div class="left">支付方式：</div>
                    <div class="right">在线支付</div>
                </div>
                <div class="item">
                    <div class="left">支付时间：</div>
                    <div class="right">2019-04-03 15:39:56</div>
                </div>
            </div>
        </div>

        <div class="btn-group">
            <div class="btn">一般按钮</div>
        </div>
    </div>
</template>

<script setup>
import orderItem from '@/components/order-item.vue';
import { useRouter } from 'vue-router';
const router = useRouter()
const back = () => {
    router.push('/myorder')
}
</script>

<style scoped lang="scss">
.container {
    background: #ddd;
    // min-height: 100vh;

    .header {
        background: linear-gradient(180deg, rgba(36, 147, 241, 1) 0%, rgba(36, 147, 241, 1) 66.37%, rgba(255, 255, 255, 0) 100%);

        .bar {
            padding: 30px 15px 20px 15px;
            position: relative;
            text-align: center;
            color: #fff;

            h1 {
                font-size: 17px;
            }

            .back {
                position: absolute;
                left: 15px;
                top: 20px;

                .iconfont {
                    font-size: 30px;
                }
            }

        }

        .title{
            color:#fff;
            font-size: 20px;
            margin: 30px 15px;
        }

        .info {
            background: #fff;
            border-radius: 6px;
            overflow: hidden;
            margin: 0 15px;

            .top {
                padding: 20px 15px;
                display: flex;
                align-items: center;
                border: 1px solid #eee;

                .pic {
                    width: 60px;
                    height: 60px;

                    img {
                        width: 100%;
                        height: 100%;
                    }
                }

                h1 {
                    font-size: 18px;
                    color: #333;
                    margin-bottom: 10px;
                }

                p {
                    font-size: 14px;
                    color: #999;
                    span{
                        display: inline-block;
                        border: 1px solid #4C9CE0;
                        color:#4C9CE0;
                        font-size: 10px;
                        border-radius: 2px;
                    }
                }
            }

        }
    }

    .content {
        margin: 15px;
        border-radius: 6px 6px 0 0;
        background: #fff;

        .head {
            display: flex;
            align-items: center;
            padding: 5px 15px;

            .pic {
                height: 30px;
                width: 30px;

                img {
                    width: 100%;
                    height: 100%;
                }
            }

            .h1 {
                font-size: 17px;
                color: #333;
            }
        }

        .total {
            height: 30px;
            text-align: center;
            line-height: 30px;
            color: #333;
            font-size: 14px;
            background: #fafafa;
        }

        .fee {
            .item {
                display: flex;
                justify-content: space-between;
                align-items: center;
                padding: 18px 15px;
                border-top: 1px solid #eee;
            }
        }

    }

    .order-info {
        margin: 15px;
        background: #fff;
        border-radius: 6px;

        .top {
            padding: 17px 15px;
            border-bottom: 1px solid #eee;
            display: flex;

            .left {
                font-size: 14px;
                color: #666;
                width: 70px;
            }

            .right {
                flex: 1;
                font-size: 14px;
                color: #333;
            }
        }

        .content {
            padding-bottom: 5px;
            .item {
                display: flex;
                margin-bottom: 15px;

                .left {
                    font-size: 14px;
                    color: #666;
                    width: 70px;

                }

                .right{
                    font-size: 14px;
                    color:#333;
                    .copy{
                        border-radius: 4px;
                        padding: 4px 6px;
                        margin-left: 10px;
                        display: inline-block;
                        border: 1px solid #4C9CE0;
                        color:#4C9CE0;
                        font-size: 12px;
                    }
                }
            }
        }
    }

    .btn-group{
        margin-top: 150px;
        height: 48px;
        background: #fff;
        display: flex;
        align-items: center;
        justify-content: flex-end;
        padding: 10px 15px;
        box-sizing: border-box;
        .btn{
            font-size: 14px;
            color:#666;
            padding: 7px 10px;
            border: 1px solid #999;
            border-radius: 20px;
        }
    }
}
</style>